package com.smartao.core.info.server;

import java.util.Properties;

/**
 * Websphere 相关容器配置，未测试
 * @author Ricky
 */
public class Websphere extends AppServer {

	private static Properties prop = new Properties();

	static {
		prop.put("java.naming.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory");
		prop.put("java.naming.provider.url", "iiop://websphere.machine.domain.com:900");
		prop.put("java.naming.factory.url.pkgs", "com.ibm.ws.naming");
		prop.put("javax.rmi.CORBA.UtilClass", "com.ibm.rmi.javax.rmi.CORBA.Util");
		prop.put("javax.rmi.CORBA.StubClass", "com.ibm.rmi.javax.rmi.CORBA.StubDelegateImpl");
		prop.put("javax.rmi.CORBA.PortableRemoteObjectClass", "com.ibm.rmi.javax.rmi.PortableRemote");
		prop.put("org.omg.CORBA.ORBClass", "com.ibm.rmi.iiop.ORB");
		prop.put("org.omg.CORBA.ORBSingletonClass", "com.ibm.rmi.corba.ORBSingleton");
	}

	public Websphere() {
		super(prop);
		this.serverInfo="IBM Websphere 7.0";
	}

	@Override
	public String getJndiName(String JndiName) {
		return JndiName;
	}

	@Override
	public String getTransactionManagerName() {
		return "org.hibernate.transaction.WebSphereTransactionManagerLookup";
	}

	@Override
	public String getServerHomeDir() {
		// TODO Auto-generated method stub
		return null;
	}
}
